package priv.mill.server.impl;
import java.util.List;

import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import priv.mill.dao.mapper.ReportMapper;
import priv.mill.entry.Report;
import priv.mill.server.ReportService;

@Component
public class ReportServiceImpl implements ReportService{

	private static final Logger logger = Logger
			.getLogger(ReportServiceImpl.class);

	@Autowired
	private ReportMapper reportMapper;
	
	@Override
	public Report getReportById(Integer reportId) {
		return reportMapper.getReportById(reportId);
	}

	@Override
	public Report getReportByEntry(Report report) {
		return reportMapper.getReportByEntry(report);
	}

	@Override
	public List<Report> getReportsByPage(Report report) {
		return reportMapper.getReportsByPage(report);
	}

	@Override
	public int updateReport(Report report) {
		return reportMapper.updateReport(report);
	}

	@Override
	public int insertReport(Report report) {
		return reportMapper.insertReport(report);
	}

	@Override
	public int deleteReport(Integer reportId) {
		return reportMapper.deleteReport(reportId);
	}
}
